#pragma once
#include "thread.h"
#include "opengl_context_pool.h"
#include <vector>
#include <windows.h>

namespace krryn{
namespace system{
	class opengl_context;
	class opengl_context_win32;
	class opengl_context_pool_win32 : public opengl_context_pool{
	public:
		opengl_context_pool_win32(HWND hWnd, long a_NumberOfContexts);
		virtual ~opengl_context_pool_win32();

		virtual void attach_context();
		virtual void swap_buffers();
	private:
		std::vector<opengl_context_win32*> m_Contexts;
		opengl_context_win32 *m_PrimaryContext;
		HWND hWnd;
		size_t m_Current;
		core::mutex m_Guard;
	};
}
}